package com.inibb.app.util.type;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Properties;
import java.util.Set;

public class PropsMap<K, V> extends HashMap<K, V> {
	/**
     *
     */
	private static final long serialVersionUID = 1L;

	public PropsMap(Properties props) {
		super();

		if (props != null) {
			Set set = props.keySet();
			Iterator iter = set.iterator();

			while (iter.hasNext()) {
				K key = (K) iter.next();
				this.put(key, (V) props.get(key));
			}
		}
	}

	public static void main(String[] args) {
		Properties props = new Properties();
		props.put("a", "b");
		props.put("a", "b");
		props.put("a", "b");
		props.put("a", "b");
		props.put("a", "b");
		props.put("a", "b");
		props.put("a", "b");

		PropsMap map = new PropsMap(props);
		System.out.println(map);
	}
}
